package com.fr.web.core.chwriter;

import com.fr.base.ColumnRow;
import com.fr.base.FRContext;
import com.fr.base.core.html.Tag;
import com.fr.base.core.json.JSONException;
import com.fr.report.CellElement;
import com.fr.report.web.ui.impl.form.TreeNodeToogleButton;
import com.fr.web.Repository;
import java.util.logging.Level;
import java.util.logging.Logger;

public class ViewCellWriter extends PageCellWriter
{
  public ViewCellWriter(Repository paramRepository, int paramInt)
  {
    super(paramRepository, paramInt, false);
  }

  protected boolean dealWithTreeNodeButton(CellElement paramCellElement, Object paramObject)
  {
    if (paramCellElement.getWidget() instanceof TreeNodeToogleButton)
    {
      try
      {
        this.resTag.attr("width", this.cellWidth + "");
        this.resTag.attr("height", this.cellHeight + "");
        this.resTag.attr("widget", widget2Config(paramCellElement.getWidget(), paramObject, ColumnRow.valueOf(paramCellElement.getColumn(), paramCellElement.getRow()), paramCellElement, this.reportIndex, null));
        dealWithTreeNodeSonList((TreeNodeToogleButton)paramCellElement.getWidget());
      }
      catch (JSONException localJSONException)
      {
        FRContext.getLogger().log(Level.WARNING, localJSONException.getMessage(), localJSONException);
      }
      return true;
    }
    return false;
  }
}